import service from '@/utils/request'

// 封装获取-权限列表接口 /sys/permission
export function getpermissionRequest() {
  return service({
    method: 'get',
    url: '/sys/permission'
  })
}
// 修改-权限点详情 /sys/permission/{id}
export function updatePermissionRequest(data) {
  return service({
    method: 'put',
    url: `/sys/permission/${data.id}`,
    data
  })
}

// 删除-权限点  /sys/permission/{id}
export function deletePermissionRequest(id) {
  return service({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}

// 新增-权限点  /sys/permission
export function addPermissionRequest(data) {
  return service({
    method: 'POST',
    url: '/sys/permission',
    data
  })
}

// 获取-权限点详情
export function getPermissionDetailRequest(id) {
  return service({
    method: 'GET',
    url: `/sys/permission/${id}`
  })
}
